home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pcmagazi / 1989 / 18 / grafpath < prev    next >
Text File  |  1988-10-06  |  872b  |  29 lines

  1.   FUNCTION GraphPath : PathStr;
  2.   (*Returns the path to your BGI files.  Assumes
  3.     that at least one of CGA, EGA, or Hercules
  4.     is present.  Asks for user help if it can't
  5.     find them.  Requires "USES DOS".*)
  6.   VAR
  7.     OneBGI : PathStr;
  8.     Dummy  : NameStr;
  9.   BEGIN
  10.     OneBGI := FSearch('CGA.BGI',GetEnv('PATH'));
  11.     IF OneBGI = '' THEN
  12.       OneBGI := FSearch('HERC.BGI',GetEnv('PATH'));
  13.     IF OneBGI = '' THEN
  14.       OneBGI := FSearch('EGAVGA.BGI',GetEnv('PATH'));
  15.     IF OneBGI = '' THEN
  16.       BEGIN
  17.         WriteLn('The BGI drivers are not present on your PATH.');
  18.         WriteLn('Please enter the full path to the BGI drivers,');
  19.         Write('>');
  20.         ReadLn(OneBGI);
  21.       END
  22.     ELSE
  23.       BEGIN
  24.         OneBGI := FExpand(OneBGI);
  25.         FSplit(OneBGI, OneBGI, dummy, dummy);
  26.       END;
  27.     GraphPath := OneBGI;
  28.   END;
  29.